Repository navigation
fix(signals): count only flag checks as stale-flag call sites - #131380
Merged
Merged
Conversation
The feature-flags scout confirmed a stale flag's call site with a raw `gh search code` match, so a declaration (an enum or a JSON list of flag keys) or an identifier that shares the key could gate an immediately-actionable cleanup. A match now counts only when it evaluates the flag or declares a gate in a flag field. Declarations are followed to their evaluations, and identifier-only matches never count. The run searches a cloned checkout when one is configured and treats an empty code-search result as weak evidence. The stale-flag lane moves into references/stale-flags.md, read on demand, which takes the body from about 56k to 40k characters. The rollout-flag name in the fallback text is dropped; the existing unfiltered health-issue probe already tells the run whether the check reaches the project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: cd6234bd-edc0-481e-a4b4-3fa9c66ba129
|
😎 Merged successfully - details. |
andrewm4894
approved these changes
Nov 7, 2026
Contributor
🤖 CI report
|
Member
|
/trunk merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The feature-flags scout can mark a stale-flag cleanup
immediately_actionablefrom anygh search codematch for the key. A declaration (an enum entry or a JSON list of flag keys) or an identifier that shares the key's string passes that check. The result is a draft PR with nothing to remove, or one that removes a live setting or route.Why: a per-team cleanup scout ran into both failure modes and fixed them, and the canonical scout's call-site check has the same gap.
Changes
references/stale-flags.md, cutting the body from about 56k to 40k characters. The fallback text drops a rollout-flag name.How did you test this code?
Test rationale: prompt-only change, no code paths touched. No test reads scout prose.
test_scout_precheck.pycovers only the unchanged frontmatter precheck.rgpattern: it matches'beta'and`beta`, and skips"beta-2".Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted). The directing person still needs to self-assign; the agent's GitHub identity could not resolve them.
Agent: Claude Code (PostHog Desktop), Opus 5.5
Skills:
authoring-scoutsMore context for AI agents
references/stale-flags.md"Confirm a call site" and theeffectively_full_rolloutsentence under "When no code is left".Created with PostHog Desktop from an inbox report
🤖 Generated with Claude Code